import shutil
import os
from tqdm import tqdm, trange

txtPath= "C:\\Users\\iLoo_Se7en(LiHang)\\Desktop\\fsdownload\\yolox-pytorch-cad-0329\\VOCdevkit\\VOC2007\\ImageSets\\Main\\val.txt"
originPath= "C:\\Users\\iLoo_Se7en(LiHang)\\Desktop\\fsdownload\\原图"
resultPath= "G:\\学习\\研究生\\小论文-性诱\\数据集\\220329\\图片分布\\val"
with open(txtPath, "r") as f:
    for line in tqdm(f.readlines()):
        line=line.replace("\n","")+".jpg"
        shutil.copy(os.path.join(originPath,line),os.path.join(resultPath,line))